/*
 * main implementation: use this sample to create your own application
 *
 */
#include <stdio.h>
#include "support_common.h" /* include peripheral declarations and more */
#include "gpio.h"
#include "pwm.h"
#include "song.h"
//#include "note.h"
//#include "intc.h"
#include "pushb.h"
//#include "pit.h"


int main(void)
{		
	
		int note_i=0;
		int delay_flag=0;
		
        gpio_port_ta_init();
        pwm_init();
        void gpt_init();
   
        Note delay_note = create_note(Pitch_00, Delay_60);
        
        MCF_PIT0_PCSR |= 0x01; // enabled when ready
        while(1)
        	
        {	
        	if(delay_flag ==0)
        	{ 
        		play_JB();
        		delay_flag=2;
        	}
        	
        	else if(delay_flag ==1)
        	{
        		play_delay(delay_note);
        		delay_flag=3;
        	}
        		
        }

        return 0;
}
